package com.ggs.rg.ybjb.pojomodule.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author cxw
 * @since 2021-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TGoodsShopping对象", description="")
public class TGoodsShopping implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键，自增，唯一值")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "关联商品参数表，外键约束")
    private Integer pid;

    @ApiModelProperty(value = "购买时的商品数量")
    private Integer count;

    @ApiModelProperty(value = "0表示删除,1表示存在,逻辑删除字段")
    @TableLogic
    private Integer deletes;

    @ApiModelProperty(value = "关联购物车表，外键约束")
    private Integer sid;

    @ApiModelProperty(value = "数据生成时自动创建时自动")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "数据生成时自动生成，修改时自动更新")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "乐观锁")
    @Version
    private Integer version;

    public TGoodsShopping(Integer pid, Integer count, Integer sid) {
        this.pid = pid;
        this.count = count;
        this.sid = sid;
    }
}
